﻿<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
    <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
    <meta http-equiv="Expires" content="86400" />
    <meta name="viewport" content="width=device-width, height=device-height" />
    <meta property="og:url" content="http://apptest12.saka-pon.net/KLibraryJS/DataBinding/TimeZones.htm" />
    <meta property="og:type" content="website" />
    <meta property="og:site_name" content="Do Design : saka-pon.net" />
    <meta property="og:title" content="Time Zones" />
    <meta property="og:description" content="データ バインディングのサンプルです。" />
    <meta property="og:image" content="http://storage.saka-pon.net/Samples/Bakery/Images/Thumbnails/cupcakes.jpg" />
    <meta property="og:locale" content="ja_JP" />
    <title>Time Zones</title>
    <script src="http://ajax.aspnetcdn.com/ajax/jQuery/jquery-1.7.2.min.js" type="text/javascript"></script>
    <script src="../Resources/Scripts/KLibrary-vsdoc.js" type="text/javascript"></script>
    <link href="../Resources/Styles/DataBinding.css" rel="stylesheet" type="text/css" />
</head>
<body>
    <div class="page">
        <h1>Time Zones</h1>
        <div class="times" data-context="appModel.TimeZones"></div>
        <script type="text/plain">
            <div>
                <h3>${Name}</h3>
                <p>${Difference>toDate:M/d HH:mm:ss}</p>
            </div>
        </script>
    </div>
    <script type="text/javascript">
        //<![CDATA[
        function toDate(x) { return new Date().addHours(x - 9); }

        var appModel = {};

        $(function () {
            $.getJSON("../Services/TimeZones.js")
                .done(function (data) {
                    appModel.TimeZones = data;
                    $(document).updateTarget();
                });

            setInterval(function () {
                $(document).updateTarget();
            }, 1000);
        });
        //]]>
    </script>
</body>
</html>
